package com.sx.gongzhong.pest;

import com.sx.gongzhong.model.HeadParamBean;
import com.sx.gongzhong.model.ReplyUserBean;
import com.sx.gongzhong.model.SplashBean;
import com.sx.gongzhong.net.ApiManager;
import com.sx.gongzhong.net.BaseCallBack;
import com.sx.gongzhong.view.SplashView;

import java.util.Map;

/**启动界面配图
 * Created by admin on 2018/1/15.
 */

public class SplashPest {
    private SplashView splashView;

    public SplashPest(SplashView splashView) {
        this.splashView = splashView;
    }
    public void getSplashData() {
        Map<String,Object> map = HeadParamBean.getHead();
        new ApiManager().getSplashData(map, new BaseCallBack<ReplyUserBean.BaseResult<SplashBean>>() {
            @Override
            public void onSuccess(ReplyUserBean.BaseResult<SplashBean> response) {
                splashView.getSplashDataSuccess(response.data);
            }
            @Override
            public void onFailures(String message) {
                splashView.showError(message);
            }
        });
    }
}
